#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int a, b;
const int N = 1e5 + 10;
int s[N];
bool st[N];
int main()
{
	cin >> a >> b;
	bool flag = 0;
	int n = 0;
	for (int i = 1; i <= 1e5 ; i++) {
		int j = i + 1;
		if ((long long)(i) * (j) / 2 == (long long)(a + b)) {
			flag = 1;
			n = i;
			break;
		}
	}
	if (!flag) {
		cout << "NO" << endl;
	}
	else {
		cout << "YES" << endl;
		cout << n << endl;
		int mi = min(a, b);
		for (int i = 1; i <= n; i++) {
			s[i] = s[i - 1] + i;
		}
		int x = 0;
		int y = 0;
		for (int i = 1; i <= n; i++) {
			for (int j = 1; j <= n; j++) {
				if (s[j] - s[i - 1] == mi) {
					x = i, y = j;
					break;
				}
			}
		}
		for (int i = x; i <= y; i++) {
			st[i] = 1;
		}
		if (mi == a) {
			for (int i = n; i >= 1; i--) {
				if (st[i]) {
					cout << i << " ";
				}
			}
		}
		else {
			for (int i = n; i >= 1; i--) {
				if (!st[i]) {
					cout << i << " ";
				}
			}
		}
	}
	return 0;
}